# Contributor: Benoit Masson <yahoo@perenite.com>
# Maintainer: Benoit Masson <yahoo@perenite.com>
pkgname=pam_sqlite3
pkgver=1.0.2
pkgrel=1
pkgdesc="pam_sqlite3"
url="https://github.com/HormyAJP/pam_sqlite3"
arch="all"
license="GPL-3.0-only"
makedepends="linux-pam-dev sqlite-dev bsd-compat-headers"
source="$pkgname-$pkgver.tar.gz::https://github.com/HormyAJP/pam_sqlite3/archive/v$pkgver.tar.gz
	broken-makefile.patch
	"
options="!check"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var
	make
}

package() {
	install -Dm755 -o root pam_sqlite3.so -t "$pkgdir"/lib/security/
}

sha512sums="
c6925adeae0f22abef20b02404a64144990d604a77fea16d100174b7a68617662ad59eba466aa33d40001e07a24ec1579cc2b59a5fcd5fb5570f658ac1a2be5e  pam_sqlite3-1.0.2.tar.gz
ef61a0905fb77de0cb6f14970886229d4c4f6d6c0854c8fc94b3e00f849e52aabb71a6c8825487918fc8d5d79941823b26cc1e2762423d85bc8ae1d50c7db41b  broken-makefile.patch
"
